﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class User_thong_tin_thanh_vien : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            GetUserInfo();
        }
    }
    protected void GetUserInfo()
    {
        SQLHelper Dal = new SQLHelper();
        Dal.CommandType = CommandType.StoredProcedure;
        Dal.CommandText = "SP_GetUserInfoByUserID";
        Dal.ParameterCollection = new string[1] { "@UserID" };
        Dal.ValueCollection = new string[1] { Request.QueryString["UserID"].ToString() };
        DataRow dr = Dal.GetDataRow();
        lblAddress.Text = dr["Address"].ToString();
        lblBirthday.Text = dr["NgaySinh1"].ToString();
        lblDisplayName.Text = dr["ShowName"].ToString();
        lblFullName.Text = dr["FullName"].ToString();
        lblIntroduce.Text = dr["About"].ToString();
        lblPhoneNumber.Text = dr["Mobile"].ToString();
        lblCountPost.Text = dr["SoBaiDang"].ToString();
        lblCountComment.Text = dr["SoBinhLuan"].ToString();
        if (dr["Gender"].ToString() == "0")
        {
            lblSex.Text = "Nữ";
        }
        else lblSex.Text = "Nam";
        avatar.ImageUrl = "~/Images/UserAvatar/" + dr["Image"].ToString();
        Page.Title = "Thông Tin Thành Viên | " + dr["ShowName"].ToString();
    }
}
